package fr.inserm.u915.organifooyi.web;

public class Message
	{
	public static enum Level { warning,error,success,message,log}; 
	private String text;
	private Level level;
	public Message(String text,Level level)
		{
		this.text=(text==null?"undefined error":text);
		this.level=(level==null?Level.error:level);
		}
	public String getText()
		{
		return text;
		}
	public Level getLevel()
		{
		return level;
		}
	@Override
	public String toString() {
		return level.name()+":"+text;
		}
	}
